﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace GameSchool.Models
{
	public class AnnouncementRepository
	{
		AnnouncementDBContextDataContext db = new AnnouncementDBContextDataContext();
		public IEnumerable<Announcement> Announcements()
		{
			return db.Announcements;
		}

		public void Save()
		{
			db.SubmitChanges();
		}

		public void Add(Announcement newAnnouncement)
		{
			db.Announcements.InsertOnSubmit(newAnnouncement);
		}
	}
}